package cn.cqie.attendance.student.domian;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.Alias;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author: xiehaodong
 * @Date: 2021/6/23 - 13:52
 * @Description: cn.cqie.attendance.student.domian
 * @version: 1.0
 */
@Data
@Accessors(chain = true)
@ApiModel(value="publishHomework", description="")
@Alias("publishHomework")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PublishHomework implements Serializable {
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 下发作业的老师 */
    @ApiModelProperty(value = "下发作业的老师")
    private Long distributedTeacher;

    /** 老师发布作业内容 */
    @ApiModelProperty(value = "老师发布作业内容")
    private String workContent;

    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "发布时间")
    private Date publishTime;

    /** 截止时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "截止时间")
    private Date endTime;

    /** 课程 */
    @ApiModelProperty(value = "课程")
    private Long courseId;

    /** 作业主题 */
    @ApiModelProperty(value = "作业主题")
    private String homeworkTheme;

    /** 0 平时作业 1  阶段作业 2 最终作业 */
    @ApiModelProperty(value = "0 平时作业 1  阶段作业 2 最终作业")
    private Long homeworkType;

    private Homework homework;
    private Attachment attachment;
    private TrainteacherCourse trainteacherCourse;
}
